

import static org.junit.Assert.*;

import java.sql.Date;

import junit.framework.Assert;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import ModelLayer.Sales;
import DBLayer.DBSales;

public class TestSales {
	
	private DBSales dbSales = new DBSales();
	Date d = new Date(new java.util.Date().getTime());
	private Sales sale = new Sales(1,d , 455, 1, "Sent", d);
	
	@Before
	public void setUp() throws Exception {
	}

	@After
	public void tearDown() throws Exception {
	}

	@Test
	public void test() {
		testInsert();
	}

	public void testInsert(){
	int rc = -1;
		try {
			rc = dbSales.insert(sale);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			
			e.printStackTrace();
			
		}
		
		Assert.assertNotSame(-1, rc);
	}
	
}
